package com.yanmaohu.yulia.bean;

import com.yanmaohu.yulia.statement.SqlControlStatement;

/**
 * @author Bright Lee
 */
public final class CallStatement implements SqlControlStatement {

    private int beginIndex;
    private int endIndex;
    private RoutineInvocation routineInvocation;

    public CallStatement(int beginIndex, RoutineInvocation routineInvocation) {
        this.beginIndex = beginIndex;
        this.endIndex = routineInvocation.getEndIndex();
        this.routineInvocation = routineInvocation;
    }

    @Override
    public int getBeginIndex() {
        return beginIndex;
    }

    @Override
    public int getEndIndex() {
        return endIndex;
    }

    public RoutineInvocation getRoutineInvocation() {
        return routineInvocation;
    }

}
